<?php

$jenis = array('1' => 'Laki-laki', '2' => 'Perempuan');

function generate_input1($type='', $array=array(), $name='', $sel='') {
    if ($type == 'radio') {
        foreach ($array as $key => $val) {
            echo '<label class="radio">';
            echo '<input data-toggle="radio" type="' . $type . '" name="' . $name . '" value="' . $key . '"/>' . $val . '&nbsp;';
            echo '</label>';
        }
    } else {
        foreach ($array as $key => $val) {
            echo '<input type="' . $type . '" name="' . $key . '" value="' . $key . '"/>' . $val . '&nbsp;';
        }
    }
}
?>
<!-- 
<h4>Register</h4>
<form name="go" method="POST" action="<?php echo site_url('registrasi/daftar');?>">
    username
    <br />
    <input type="text" name="username" value="chamz" />
    <br />
    name
    <br />
    <input type="text" name="name" value="Indra Firman Cahya" />
    <br />
    password (md5)
    <br />
    <input type="text" name="password" value="wajajaja" />
    <br />
    gender (M / F)
    <br />
    <input type="text" name="gender" value="M" />
    <br />
    phoneNumber
    <br />
    <input type="text" name="phoneNumber" value="081234567890" />
    <br />
    email
    <br />
    <input type="text" name="email" value="chamz@ojex.com" />
    <br />
    <input type="submit" value="SIGN UP"/>
</form> -->
<div class="page">
    <div class="container">
        <div class="span10 offset1" style="margin-top:20px" id="wrap">
            <div class="alert alert-error fade in">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            Silakan LOG IN untuk masuk, atau SIGN UP untuk register
          </div>
            <div class="row-fluid" >
                <div class="span6" id="profil-side">
                    <div class="span12"><h4><strong>LOG IN</strong></h4></div>
            <form class="span12 offset1" method="POST" action="<?php echo site_url('login');?>">
              <!-- <div class="control-group">
                <label class="controls" style="color:red;"><?php echo $error; ?></label>
              </div> -->
              <div class="row">
    <div class="span2">Username</div>   
    <div class="span4"><input class="span3" type="text" name="username" value="" placeholder="Username"/></div>
    </div>
    <div class="row">
    <div class="span2">Password</div>   
    <div class="span4"><input class="span3" type="password" name="password" value="" placeholder="password"/></div>
    </div>
              <div class="control-group">
                <div class="controls">                
                  <a href="#myModal" data-toggle="modal" class="">Lupa password?</a>
                </div>
              </div>
              <div class="control-group">
                <div class="controls">                
                  <button type="submit" class="btn">LOG IN</button>
                </div>
              </div>
            </form>
            <!-- Modal -->
        <div id="myModal" class="span5 modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 id="myModalLabel">Masukkan email atau username</h4>
            </div>
            <form method="POST" action="<?php echo site_url();?>/profil/lupaPassword">
                <div class="modal-body">
                    <div class="span4">
                        <input type="text" value="" name="usernameoremail" placeholder="username atau email" class="span4" />
                    </div>
                    <div class="span2 emailsubmit">
                        <input type="submit" value="SUBMIT" class="btn btn-primary" />
                    </div>
                </div>
            </form>
        </div>
                </div>
                <div class="span6" id="profil-side">
                    <div class="span12"><h4><strong>SIGN UP</strong></h4></div>
<form class="span12 offset1"  name="go" method="POST" action="<?php echo site_url('registrasi/daftar');?>">  
    
    <div class="row">
    <div class="span2">Nama</div>
    <div class="span6"><input class="span3" type="text" name="name" value="" /></div>
    </div>
    <div class="row">          
    <div class="span2"> Jenis Kelamin:  </div>
    <div class="span4">        
        <?php generate_input1('radio',$jenis,'gender'); ?>
    </div>
    </div>
    <div class="row">
    <div class="span2">Telepon</div>    
    <div class="span6"><input class="span3" type="text" name="phoneNumber" value="" placeholder="Telepon" /></div>
    </div>
    <div class="row">
    <div class="span2">Username</div>   
    <div class="span6"><input class="span3" type="text" name="username" value="" placeholder="Username"/></div>
    </div>
    <div class="row">
    <div class="span2">Password</div>   
    <div class="span6"><input class="span3" type="password" name="password" value="" placeholder="password"/></div>
    </div>
    <div class="row">
    <div class="span2">Email </div>   
    <div class="span6"><input class="span3" type="text" name="email" value="" placeholder="you@email.com"/></div>
    </div>
    <div class="row">
    <div class="span6">
    <input type="submit" class="btn btn-primary btn-large" value="SIGN UP"/>
</div></div>
</form>
                </div>
            </div>
            

    <br/>
</div>
</div>
</div>